<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../conn/conn.asp"-->
<!--#include file="../conn/JSON_2.0.4.asp"-->
<%
response.codepage="65001"
response.Charset = "utf-8"
dim sql, parent, jsa, i
parent = request.Form("id")
set jsa = jsArray()
i = 0
if parent <> "" then
	sql = "select * from lanmu where lanmu_parent=" & parent
	set rs = server.CreateObject("adodb.recordset")
	rs.open sql,conn,1,1
	while not (rs.eof or rs.bof)
		set jsa(i) = jsObject()
		jsa(i)("id") = rs("id")
		jsa(i)("text") = rs("lanmu_title")
		if rs("lanmu_leaf") then
			jsa(i)("state") = "open"
		else
			jsa(i)("state") = "closed"
		end if
		i = i + 1
		rs.movenext
	wend
else
	set jsa(i) = jsObject()
	jsa(i)("id") = 0
	jsa(i)("text") = "网站内容管理"
	jsa(i)("state") = "closed"
end if
jsa.Flush
%>